﻿using System;
using System.Collections.Generic;
using System.Text;

namespace 汽车类
{
    class Truck:car
    {
        //卡车类Truck是Car类的子类，其中包含的属性有载重量payload。
        protected double Payload;
        public Truck()
        {
            Wheels = 12;
            Weight = 1.8;
            Loader = 2;
        }
        public void print()
        {
            Console.WriteLine("卡车的轮子有{0}，重量有{1}t，载有人数{2}人", Wheels, Weight, Loader);
        }
    }
}
